import { BasicRouteItem } from '@/router/index.type'
import { localMenuData } from '@/router/loader'
import { create } from 'zustand'

interface InitialState {
  systemTitle: string
  menuTreeList: BasicRouteItem[]
}

interface SystemSettingActions {
  getMenuTreeList: () => void
}

export const useSystemSettings = create<InitialState & SystemSettingActions>((set) => ({
  systemTitle: '财务支付管理平台',
  menuTreeList: [],
  getMenuTreeList: async () => {
    // const { data } = await menuRoutesApi()
    set({
      menuTreeList: localMenuData
    })
  }
}))
